﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using Dict.Config;
using Dict.Blo;
using Dict.DataModel;
using Dict;
namespace UI
{
    public class HpIcon : MonoBehaviour
    {
        public TextureKit icon;
        public UILabel labelname;
        public UILabel num;
        // Use this for initialization
        void Start()
        {

        }

        // Update is called once per frame
        void Update()
        {

        }

        public void setIcon(string id)
        {
            icon.iconType = TextureIcon.ITEM;
            var ti = DictDataManager.Instance.tableItemDao.GetById(id);
            icon.textureName = ti.icon;
            labelname.text = ti.name;
            num.text = StaticData.playerData.GetSimpleGoods(id).num+"";
        }

        public void setFishIcon(string id)
        {
            icon.iconType = TextureIcon.FISH;
            //var ti = DictDataManager.Instance.tableFishSkillDao.GetById(id);
            icon.textureName = id;
            labelname.text = TableTextBlo.GetText("name_" + id);
            num.text = StaticData.playerData.FishItems[id].num+"";
        }
    }
}

